home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 22 / 022.d81 / convert all (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  212 lines

  1. 0 dims$(15),c$(22),q$(23),p(22):s=1:d=53280:g=.:m=s:n=1048575:a=48:r=2
  2. 1 e=16:u=4096:v=256:e2=64:e3=128:e5=8:e6=4:e1=32:q=65536:printchr$(142):goto71
  3. 2 h1=g:h2=g:h3=g:h4=g
  4. 3 ifx>s1thenh1=h1+m:x=x-q:goto3
  5. 4 ifx>s2thenh2=h2+m:x=x-u:goto4
  6. 5 ifx>s3thenh3=h3+m:x=x-v:goto5
  7. 6 ifx>s4thenh4=h4+m:x=x-e:goto6
  8. 7 e$(1)=q$(h1):e$(2)=q$(h2):e$(3)=q$(h3):e$(4)=q$(h4):e$(5)=q$(x):return
  9. 9 b(1)=g:b(2)=g:b(3)=g:b(4)=g:b(5)=g:b(6)=g:b(7)=g:b(8)=g
  10. 10 ifx>s3thenx=x-v:b(m)=m
  11. 11 ifx>s5thenx=x-e3:b(2)=m
  12. 12 ifx>s6thenx=x-e2:b(3)=m
  13. 13 ifx>s7thenx=x-e1:b(4)=m
  14. 14 ifx>s4thenx=x-e:b(5)=m
  15. 15 ifx>s8thenx=x-e5:b(6)=m
  16. 16 ifx>s9thenx=x-e6:b(7)=m
  17. 17 ifx>mthenx=x-r:b(8)=m
  18. 18 b(9)=x:return
  19. 20 gosub800:gosub825
  20. 21 print"[146]":forf=ftof+s*13steps:print"";
  21. 22 prints$(len(str$(f)));f;"";
  22. 23 oncgoto25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
  23. 24 t=f*30:goto40
  24. 25 t=(f*9)/5+e1:goto40
  25. 26 t=((f-e1)*5)/9:goto40
  26. 27 t=f*.621:goto40
  27. 28 t=f*1.609:goto40
  28. 29 t=f*3.3:goto40
  29. 30 t=f/3.3:goto40
  30. 31 t=f*.3937:goto40
  31. 32 t=f*2.54:goto40
  32. 33 t=f*2.2046:goto40
  33. 34 t=f*.45:goto40
  34. 35 t=f*.035:goto40
  35. 36 t=f*28:goto40
  36. 37 t=f*.264:goto40
  37. 38 t=f*3.785:goto40
  38. 39 t=f*.03
  39. 40 printt;"[157]";s$(len(str$(t)));"";:next:gosub850:ifo<5then21
  40. 41 ifo=6thenpoked,14:poked+1,11:print"[147]":goto20
  41. 42 return
  42. 71 s$(1)="                 ":s$(2)="                ":s$(3)="               "
  43. 72 s$(4)="              ":s$(5)="             ":s$(6)="            "
  44. 73 s$(8)="          ":s$(9)="         ":s$(10)="        ":s$(11)="       "
  45. 74 s$(13)="     ":s$(14)="    ":s$(7)="           ":s$(12)="      ":p(22)=15
  46. 75 c$(1)="celsius - fahrenheit":p(18)=11:p(19)=12:p(20)=13:p(21)=14
  47. 76 c$(2)="       fahrenheit - celsius":poke788,52
  48. 77 c$(3)="       kilometers - miles":c$(4)="           miles - kilometers"
  49. 78 c$(5)="           meters - feet":c$(6)="             feet - meters"
  50. 79 c$(7)="      centimeters - inches":c$(8)="          inches - centimeters"
  51. 80 c$(9)="        kilograms - pounds":c$(10)="           pounds - kilograms"
  52. 81 c$(11)="            grams - ounces":c$(12)="           ounces - grams"
  53. 82 c$(13)="           liters - gallons":c$(14)="          gallons - liters"
  54. 83 c$(15)="      milliliters - fluid ounces"
  55. 84 c$(16)="     fluid ounces - milliliters"
  56. 85 c$(17)="          decimal - hex":c$(18)="              hex - decimal"
  57. 86 c$(19)="          decimal - bianary":c$(20)="          bianary - decimal"
  58. 87 forj=0to9:q$(j)=right$(str$(j),1):p(j)=j:next:q1=511
  59. 88 q$(10)="a":q$(11)="b":q$(12)="c":q$(13)="d":q$(14)="e":q$(15)="f":p(17)=10
  60. 89 s0=14:s1=65535:s2=4095:s3=255:s4=15:s5=127:s6=63:s7=31:s8=7:s9=3
  61. 90 q$(17)="a":q$(18)="b":q$(19)="c":q$(20)="d":q$(21)="e":q$(22)="f":q$(23)="0"
  62. 100 poked,10:poked+1,2:print"[146][147]"spc(14)"convert  all":printspc(9)"from  ";
  63. 101 print"panther software":print"[150]                                     ";
  64. 105 print"               [150]                            ";
  65. 108 print"[150]                                        "
  66. 109 print"[144]  [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174][194]";spc(34)"[194]"
  67. 110 print"  [194][150]          d[146]istance        [144]        [194]"
  68. 112 print"  [194][150]          w[146]eight                  [144][194]":print"  [194][150]          ";
  69. 114 print"n[146]umbering systems       [144][194]":print"  [194][150]          l[146]iquids     ";
  70. 116 print"            [144][194]":print"  [194][150]          t[146]emperature             [144][194]"
  71. 118 print"  [194][150]                                  [144][194]":print"  [194][150]          s[146]tep";
  72. 120 print" change             [144][194]":print"  [194][150]                                  [144][194]
  73. 122 [153]"  peekcmdpeekondef          ewaitxit program            stoppeekcmdpeek"
  74. 123 [153]"  /tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp"
  75. 124 [153]"defpress option"
  76. 125 x[178]0:[129]j[178]1[164]35:[161]x$:[139]x$[178]"l"[176]x$[178]"d"[176]x$[178]"t"[176]x$[178]"e"[176]x$[178]"w"[167]x[178]1:j[178]35
  77. 126 [139]x$[178]"n"[176]x$[178]"s"[176]x$[178]""[167]x[178]1:j[178]35
  78. 130 [130]:[139]x[178]1[167]139
  79. 134 [153]"def             "
  80. 135 [129]j[178]1[164]15:[161]x$:[139]x$[178]"w"[176]x$[178]"d"[176]x$[178]"e"[176]x$[178]"t"[176]x$[178]"l"[167]x[178]1:j[178]15
  81. 136 [139]x$[178]"n"[176]x$[178]"s"[176]x$[178]""[167]x[178]1:j[178]15
  82. 137 [130]:[139]x[178]0[167]124
  83. 139 [139]x$[178]"e"[176]x$[178]""[167]920
  84. 140 [151]d,14:[151]d[170]1,11:[153]"load":[139]x$[178]"d"[167]190
  85. 150 [139]x$[178]"w"[167]230
  86. 151 [139]x$[178]"n"[167]300
  87. 152 [139]x$[178]"l"[167]260
  88. 153 z$[178]"":[139]x$[178]"t"[167]180
  89. 155 [153]"loadwait character increment now set at";s:[153]" return new step ";
  90. 157 [161]x$:[153]"tocmd";:[139]x$[178][199](13)[167]s[178][197](z$):[137]100
  91. 158 [139]x$[179][177][199](20)[175]x$[179][177]"cmd"[175]x$[179][177]"0"[175]x$[179][177]"."[175][197](x$)[179]1[167]157
  92. 159 [139][195](z$)[179]1[175](x$[178]"cmd"[176]x$[178][199](20))[167]157
  93. 160 [139]x$[178]"cmd"[176]x$[178][199](20)[167]z$[178][200](z$,[195](z$)[171]1):[153]"cmd  cmdcmd";:[137]157
  94. 162 [153]x$;:z$[178]z$[170]x$:[137]157
  95. 180 [153]" from :  cwaitelsius to fahrenheit":[153]"         fwaitahrenheit";
  96. 181 [153]" to celsius"
  97. 184 [161]x$:[139]x$[179][177]"f"[175]x$[179][177]"c"[167]184
  98. 186 c[178]1:[139]x$[178]"f"[167]c[178]2
  99. 187 [141]20:[137]100
  100. 190 [153]" from :  kwaitilometers to miles":[153]"         mwaitiles to kilometers"
  101. 192 [153]"         mewaitters to feet":[153]"         fwaiteet to meters"
  102. 194 [153]"         cwaitentimeters to inches":[153]"         iwaitnches to ";
  103. 195 [153]"centimeters"
  104. 198 [161]x$:[139]x$[179][177]"k"[175]x$[179][177]"m"[175]x$[179][177]"e"[175]x$[179][177]"f"[175]x$[179][177]"c"[175]x$[179][177]"i"[167]198
  105. 200 c[178]3:[139]x$[178]"m"[167]c[178]4
  106. 201 [139]x$[178]"e"[167]c[178]5
  107. 202 [139]x$[178]"f"[167]c[178]6
  108. 203 [139]x$[178]"c"[167]c[178]7
  109. 204 [139]x$[178]"i"[167]c[178]8
  110. 206 [141]20:[137]100
  111. 230 [153]" from : kwaitilograms to pounds":[153]"        pwaitounds to kilograms"
  112. 232 [153]"        gwaitrams to ounces":[153]"        owaitunces to grams"
  113. 235 [161]x$:[139]x$[179][177]"k"[175]x$[179][177]"p"[175]x$[179][177]"g"[175]x$[179][177]"o"[167]235
  114. 237 c[178]9:[139]x$[178]"p"[167]c[178]10
  115. 238 [139]x$[178]"g"[167]c[178]11
  116. 239 [139]x$[178]"o"[167]c[178]12
  117. 240 [141]20:[137]100
  118. 260 [153]" from :  lwaititers to gallons":[153]"         gwaitallons to liters"
  119. 262 [153]"         mwaitilliliters to fluid ounces"
  120. 263 [153]"         fwaitluid ounces to milliliters"
  121. 265 [161]x$:[139]x$[179][177]"l"[175]x$[179][177]"g"[175]x$[179][177]"m"[175]x$[179][177]"f"[167]265
  122. 268 c[178]13:[139]x$[178]"g"[167]c[178]14
  123. 270 [139]x$[178]"m"[167]c[178]15
  124. 272 [139]x$[178]"f"[167]c[178]16
  125. 275 [141]20:[137]100
  126. 300 [153]" from :  dwaitecimal to hex":[153]"         hwaitex to decimal"
  127. 302 [153]"         dewaitcimal to bianary":[153]"         bwaitinary to decimal"
  128. 305 [161]x$:c[178]0:[139]x$[179][177]"d"[175]x$[179][177]"h"[175]x$[179][177]"e"[175]x$[179][177]"b"[167]305
  129. 308 ss[178][181](s):[139]x$[178]"d"[176]c[178]17[167]c[178]17:[141]800:[141]825:[137]320
  130. 309 [139]x$[178]"h"[176]c[178]18[167]c[178]18:[141]905:[141]825:[137]345
  131. 310 [139]x$[178]"e"[176]c[178]19[167]c[178]19:[141]800:[141]825:[137]400
  132. 312 [139]x$[178]"b"[176]c[178]20[167]c[178]20:[141]885:[141]825:[137]450
  133. 320 [153]"wait":[129]i[178]m[164]s0:[153]"";:[139]f[179]g[167]f[178]g
  134. 322 [139]f[177]n[167]f[178]n
  135. 324 [153]s$([195]([196](f)));f;"";:x[178]f:[141]2
  136. 325 [153]e$(1);e$(2);e$(3);e$(4);e$(5);" "
  137. 335 [139]i[173]r[179][177][181](i[173]2)[167][153]"on";
  138. 338 f[178]f[170]ss:[130]:[141]850:[145]o[137]320,320,320,320,100
  139. 340 [151]d,14:[151]d[170]1,11:[153]"load":x$[178]"":[137]308
  140. 345 [153]"wait":[129]i[178]m[164]s0:[153]"             ";
  141. 348 [153]e$(1);e$(2);e$(3);e$(4);e$(5);"";
  142. 350 t[178]q[172]p([198](e$(1))[171]a)[170]u[172]p([198](e$(2))[171]a)[170]v[172]p([198](e$(3))[171]a)
  143. 355 t[178]t[170]e[172]p([198](e$(4))[171]a)[170]p([198](e$(5))[171]a)
  144. 359 [153]t;"cmd   "
  145. 36